/*
 * @Author: moxunjingmu
 * @Date: 2025-03-04 15:27:50
 * @Description: 
 */
export type Difficulty = "easy" | "medium" | "hard" | "expert";

export type Category =
  | "javascript"
  | "typescript"
  | "vue"
  | "react"
  | "node"
  | "css"
  | "html"
  | "performance"
  | "design-patterns"
  | "engineering"
  | "mini-programs";

export interface Question {
  id: string;
  category: Category;
  difficulty: Difficulty;
  question: string;
  answer: string;
  hints?: string[];
  relatedLinks?: string[];
}

export interface UserAnswer {
  questionId: string;
  userAnswer: string;
  score: number; // 0-100
  timestamp: number;
}

export interface SimulationResult {
  id: string;
  date: number;
  questions: string[]; // Question IDs
  answers: UserAnswer[];
  totalScore: number;
  duration: number; // in seconds
}

export interface UserProgress {
  answeredQuestions: Record<string, UserAnswer>;
  bookmarkedQuestions: string[]; // Question IDs
  simulations: SimulationResult[];
  streakDays: number;
  lastPracticeDate?: number;
}
